package pers.muci.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author muci
 * @version 1.0
 * @description 输出
 * @date 2023/2/2 17:37
 */

@RestController
@RefreshScope
class EchoController {

    @Value("${server.port}")
    private String port;

    @Value("${test}")
    private String test;

    @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)
    public String echo(@PathVariable String string) {
        return "Hello Nacos Discovery " + string + " port = " + port;
    }
}
